using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration; using Sispe.Entities;

namespace Sispe.Repository.Mapping
{
    public class REGIMEN_SALUDMap : EntityTypeConfiguration<REGIMEN_SALUD>
    {
        public REGIMEN_SALUDMap()
        {
            // Primary Key
            this.HasKey(t => t.IdRegimenSalud);

            // Properties
            this.Property(t => t.Descripcion)
                .IsRequired()
                .HasMaxLength(50);

            this.Property(t => t.Codigo)
                .IsRequired()
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("REGIMEN_SALUD");
            this.Property(t => t.IdRegimenSalud).HasColumnName("IdRegimenSalud");
            this.Property(t => t.Descripcion).HasColumnName("Descripcion");
            this.Property(t => t.Codigo).HasColumnName("Codigo");
        }
    }
}
